package impl;

import com.alibaba.dubbo.config.annotation.Service;
import entity.Users;
import mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import service.UserService;

import java.util.List;
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public int register(Users user) {
        return userMapper.register(user);
    }

    @Override
    public int updateUser(Users user) {
        return userMapper.updateUser(user);
    }

    @Override
    public int deleteUser(int id) {
        return userMapper.deleteUser(id);
    }

    @Override
    public List<Users> findUsers(String userName) {
        return userMapper.findUsers(userName);
    }

    @Override
    public Users getUser(int id) {
        return userMapper.getUser(id);
    }
}
